/ Assembly List / LJCNetCommon / HTMLBuilder / GetAttribs

Namespace - LJCNetCommon


Parameters
htmlAttribs - The attributes collection.
textState - The current text state values.

Returns

The attributes text.

Syntax

C#
public String GetAttribs(Attributes htmlAttribs, TextState textState)

Gets the attributes text.

Remarks

The returned text does not end with a new line. This allows for additions after the text.
Begin, Create and End text will start with a new line if the builder text already has a value.

Example

C#
// Root Method Begin
var textState = new TextState();

// Defaults: IndentCharCount = 2, LineLimit = 80, WrapEnabled = false.
var hb = new HTMLBuilder(textState);

var attribs = new Attributes()
{
    { "class", "Selector" },
};
hb.Begin("div", textState, attribs);
hb.End("div", textState);
var result = hb.ToString();

// result:
// <div class="Selector">
// <div>

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.